﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

public partial class giaovien_TrangDanhSachYKien : System.Web.UI.Page
{
    SoLienLacDataContext db = new SoLienLacDataContext();
   
    protected void Page_Load(object sender, EventArgs e)
    {
        if (Session["Username"] == null || Session["Username"].ToString() == "")
        {
            Response.Redirect("~/GiaoDienClient/TrangChu.aspx");
        }
        else
        {
            if (!IsPostBack)
            {
                LoadMaTin();
            }
        }
    }
    public void LoadMaTin()
    {
        var c = from p in db.YKienPhuHuynhs
                where p.MaCanBoGV==Session["Username"].ToString()&&p.TrangThaiTraLoi==false
                select new {p.TieuDe,p.HocSinh.TenHS,p.MaTin,p.NoiDungYKien,p.NgayGui };
        dtlYKien.DataSource = c;
        dtlYKien.DataBind();
    }
    protected void dtlYKien_SelectedIndexChanged(object sender, EventArgs e)
    {

    }
}